
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui' // 2.0 
import filters from "@/utils/filter.js"
import utils from "@/utils/common.js"
import store from "@/store"; // vuex

Vue.config.productionTip = false; // 是否启动生产消息

Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key]);
});
Vue.use(uView);
// 防抖
var timer = null;
var isclick = true;
Vue.prototype.throttle = ()=>{
    if(isclick){
      isclick = false;
      timer = setTimeout(()=>{
        isclick = true
      },1000);
       return true
    }
};
Vue.prototype.toPath = (path,id)=>{
	if(id){
		uni.navigateTo({
			url:path + '?id=' + id,
		})
	}else{
		uni.navigateTo({
			url:path
		})
	}
}
Vue.prototype.uuid = ()=>{
	// return uni.$u.guid(10)
	return Date.now()
}
Vue.prototype.$img = (img)=>{
	// return require('@/static/img/' + img) 
	return 'https://ycgov.zkzhimu.cn/img/' + img
	
}
Vue.prototype.$utils = utils;
Vue.prototype.$store = store;
Vue.prototype.$toBack = ()=>{
	uni.navigateBack({
		delta:1
	})
}